package ClassWork.Work_03.Person;

public class Teacher extends Person{
    private double salary;

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public Teacher(){

    }

    public void show(){
        super.show();
        System.out.println("Salary: " + this.salary);
    }

    public void teach(){
        System.out.println("老师" + getName() + "的工资是" + getSalary() + "元。");
    }
}
